{% macro datatable(url, id="table_id") %}
<script type=text/javascript>

$(document).ready(function() {
	$('#{{id}}').dataTable( {
        "bProcessing": true,
		"sAjaxSource": "{{url}}"
	} );
} );  
</script>
{% endmacro %}
